* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
:root {
    --clr: #039d5d;
}
body {
    width: 100%;
    min-height: 100vh;
    background: var(--clr);
    display: flex;
    justify-content: center;
    align-items: center;
}
.container {
    position: relative;
    width: 500px;
    height: 600px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    animation: 1.2s cubic-bezier(.37, -0.09, 0, 1.6) bounceInUp;
}
@keyframes bounceInUp {
    from {
        opacity: 0;
        transform: translateY(2000px) scale(.1);
    }
    65% {
        opacity: 1;
        transform: translateY(-100px);
    }
    75% {
        transform: translateY(20px);
    }
    90% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}
.container .letter-wrapper {
    position: relative;
    width: 100%;
    height: 360px;
    background-image: url(./images/bg.png);
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}
.container .letter-wrapper .cover {
    position: absolute;
    width: 100%;
    height: 210px;
    z-index: 5;
    background-image: url(./images/cover-front.png);
    background-position: 0;
    background-repeat: no-repeat;
    background-size: cover;
    top: 0;
    animation: .8s .3s forwards rollingOver;
    transform-origin: 0 5px;
}
@keyframes rollingOver {
    10% {
        background-image: url(./images/cover-front.png);
    }
    100% {
        z-index: 2;
        background-image: url(./images/cover-back.png);
        transform: rotateX(-180deg);
    }
}
.container .letter-wrapper .letter {
    position: absolute;
    z-index: 3;
    width: 450px;
    height: 500px;
    margin: 2px;
    padding: 35px 35px 350px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 2px 5px 10px #000;
    transform: translateY(180px);
    animation: .7s .7s forwards letterBounceInUp;
}
@keyframes letterBounceInUp {
    from {
        transform: translateY(180px);
    }
    40% {
        transform: translateY(-20px);
    }
    75% {
        transform: translateY(10px);
    }
    90% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}
.container .letter-wrapper .letter p {
    font-size: 18px;
    line-height: 1.6;
    color: #213547;
    margin: 10px 0;
}
.container .letter-wrapper .letter p:first-child::first-letter {
    font-size: 60px;
    line-height: 1;
    float: left;
    margin-right: 8px;
}
.container .letter-wrapper .letter span {
    position: absolute;
    font-size: 24px;
    font-weight: 700;
    top: 20px;
    right: 26px;
    opacity: .1;
}
.container .letter-wrapper .envelope {
    position: absolute;
    width: 500px;
    height: 360px;
    z-index: 4;
    background-image: url(./images/envelope.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 40px;
    font-size: 24px;
    color: #000;
}
.container .letter-wrapper .envelope b {
    opacity: .3;
}
.container .letter-wrapper .envelope small {
    opacity: .3;
    font-weight: 200;
}